package com.neu.yth.nepBackend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 区域网格信息
 * </p>
 *
 * @author YTH
 * @since 2024-06-12
 */
@Getter
@Setter
@TableName("grid")
@ApiModel(value = "Grid对象", description = "区域网格信息")
@ToString
public class Grid implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("网格编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("网格名称")
    @TableField("gname")
    private String gname;

    @ApiModelProperty("所属父级网格ID")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty("区域的状态")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("区域级别：0- 国家，1-省，2-市，3-区县")
    @TableField("level")
    private Byte level;

    @ApiModelProperty("区域的编码")
    @TableField("adcode")
    private String adcode;

    @TableField(exist = false)
    private List<Grid> children =new ArrayList<>();

    @TableField(exist = false)
    private Long count;
}
